<?php 
if(!isset($_SESSION))
 {
  session_start();
 }
include_once('_inc/config.php');
include_once('_class/db.php');
if (isset($_GET['page']) && !empty($_GET['page']))
{ 
	$ex = substr($_GET['page'], 0, strpos($_GET['page'], '/'));
	if (isset($ex) && !empty($ex))
	 include_once('_fct/'.$ex.'/auth.php');
    if (isset($_GET['fct']) && !empty($_GET['fct']))
    {
     include_once('_fct/'.$_GET['fct'].'.php');
    }
   include_once('pagetype.php');
}
else if (isset($_GET['ajax']) && !empty($_GET['ajax']))
 include_once('_fct'.$_GET['ajax'].'php');
else
{
 $path = ROOT.'?page=Accueil';
 header("Location: $path");
}
?>